/*   1:    */ package com.rinsi.app.azsb.azzl.azsqs.zjyqsqs.three;
/*   2:    */ 
/*   3:    */ import com.rinsi.core.CoreCache;
/*   4:    */ import com.rinsi.core.service.CoreSimpleService;
/*   5:    */ import com.rinsi.util.ListUtil;
/*   6:    */ import com.rinsi.util.MapUtil;
/*   7:    */ import java.util.List;
/*   8:    */ import java.util.Map;
/*   9:    */ import org.mybatis.spring.SqlSessionTemplate;
/*  10:    */ import org.springframework.stereotype.Service;
/*  11:    */ 
/*  12:    */ @Service
/*  13:    */ public class ZjyqsqsThreeService
/*  14:    */   extends CoreSimpleService
/*  15:    */ {
/*  16:    */   public void afterIndex(Map<String, Object> model, Map<String, Object> rMap)
/*  17:    */   {
/*  18: 17 */     Map<String, Object> params = getParams(model);
/*  19:    */     
/*  20: 19 */     Map<String, Object> config = getConfig(model);
/*  21:    */     
/*  22:    */ 
/*  23: 22 */     List<Map<String, Object>> modules = CoreCache.getCacheList(MapUtil.getString(params, "UID"), "modules");
/*  24:    */     
/*  25: 24 */     List<Map<String, Object>> sub_rights = ListUtil.subList(modules, "MODULE_NO_PRE='500002'");
/*  26:    */     
/*  27: 26 */     rMap.put("azsbxx", getSqlSessionTemplate().selectOne("azsb.get", params));
/*  28:    */     
/*  29: 28 */     rMap.put("userxx", CoreCache.getCacheMap(MapUtil.getString(params, "UID"), "user"));
/*  30:    */     
/*  31: 30 */     rMap.put("organxx", CoreCache.getCacheMap(MapUtil.getString(params, "UID"), "organ"));
/*  32:    */     
/*  33: 32 */     model.put("sub_rights", ListUtil.listToMap(sub_rights, "MODULE_TYPE"));
/*  34:    */     
/*  35: 34 */     rMap.putAll(getParams(model));
/*  36:    */     try
/*  37:    */     {
/*  38: 38 */       List<Map<String, Object>> datas = getSqlSessionTemplate().selectList(namespace(config) + ".list", params);
/*  39: 40 */       if (datas.size() == 0)
/*  40:    */       {
/*  41: 42 */         getSqlSessionTemplate().selectList(namespace(config) + ".init", params);
/*  42:    */         
/*  43: 44 */         datas = getSqlSessionTemplate().selectList(namespace(config) + ".list", params);
/*  44:    */       }
/*  45: 48 */       rMap.put("datas", datas);
/*  46:    */       
/*  47: 50 */       rMap.put("success", Boolean.valueOf(true));
/*  48:    */     }
/*  49:    */     catch (Exception e)
/*  50:    */     {
/*  51: 54 */       rMap.put("success", Boolean.valueOf(false));
/*  52: 56 */       if (MapUtil.getBoolean(rMap, "shoeExMessage").booleanValue()) {
/*  53: 58 */         rMap.put("message", e.getMessage());
/*  54:    */       } else {
/*  55: 62 */         rMap.put("message", "展示数据列表出错！请稍后重试，或联系系统管理员！");
/*  56:    */       }
/*  57: 65 */       rMap.put("ex", e.getMessage());
/*  58:    */       
/*  59: 67 */       e.printStackTrace();
/*  60:    */     }
/*  61:    */   }
/*  62:    */   
/*  63:    */   public Map<String, Object> pgxx(Map<String, Object> model)
/*  64:    */   {
/*  65: 75 */     Map<String, Object> params = getParams(model);
/*  66:    */     
/*  67: 77 */     Map<String, Object> config = getConfig(model);
/*  68:    */     
/*  69: 79 */     Map<String, Object> rMap = getRMap();
/*  70:    */     try
/*  71:    */     {
/*  72: 83 */       int pgxx = ((Integer)getSqlSessionTemplate().selectOne(namespace(config) + ".getPGXX", params)).intValue();
/*  73: 85 */       if (pgxx != 0) {
/*  74: 87 */         throw new Exception("请填写全部自查报告！");
/*  75:    */       }
/*  76: 91 */       rMap.put("success", Boolean.valueOf(true));
/*  77:    */     }
/*  78:    */     catch (Exception e)
/*  79:    */     {
/*  80: 95 */       rMap.put("success", Boolean.valueOf(false));
/*  81: 97 */       if (MapUtil.getBoolean(rMap, "shoeExMessage").booleanValue()) {
/*  82: 99 */         rMap.put("message", e.getMessage());
/*  83:    */       } else {
/*  84:103 */         rMap.put("message", "展示数据列表出错！请稍后重试，或联系系统管理员！");
/*  85:    */       }
/*  86:106 */       rMap.put("ex", e.getMessage());
/*  87:    */       
/*  88:108 */       e.printStackTrace();
/*  89:    */     }
/*  90:112 */     return rMap;
/*  91:    */   }
/*  92:    */ }


/* Location:           D:\Users\Desktop\shanxi\项目\sxazmis\WEB-INF\classes\
 * Qualified Name:     com.rinsi.app.azsb.azzl.azsqs.zjyqsqs.three.ZjyqsqsThreeService
 * JD-Core Version:    0.7.0.1
 */